https://glot.io/snippets/ghhrkaxv9a/raw/main.lua